import Vue from 'vue'
import Vuex from 'vuex'
 
Vue.use(Vuex)
 
export default new Vuex.Store({
  //数据，相当于data
  state: {
    name:'',
    sex:'',
    username:'',
    custType:'',
  },
  getters: {
    
  },
  //里面定义方法，操作state方发
  mutations: {
    getCustLogin(state, custLogin){
      state.custLogin = custLogin;
    },
    getName(state, name) {
        state.name = name;
      },
    getSex(state, sex) {
        state.sex = sex;
    },
    getUserName(state, username) {
      state.username = username;
    },
    getCustType(state,custType){
      state.custType = custType;
    },
    getUserNumber(state,userNumber){
      state.userNumber = userNumber
    },
    getnickname(state,nickname){
      state.nickname = nickname
    },
    getphone(state,phone){
      state.phone = phone
    },
    getstudentId(state,id){
      state.id = id
    },
    getheadImg(state,headImg){
      state.headImg = headImg
    },
    getusername(state,username){
      state.username = username
    }
  },
  // 操作异步操作mutation
  actions: {
    
  },
  modules: {
    
  },
})